@model List<MyMvcApp.Models.BlogCreateDto>

<h2>博客列表</h2>

<style>
    table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }

    th, td {
        padding: 10px;
        text-align: left;
        border-bottom: 1px solid #ddd; /* 增加分割线 */
    }

    th {
        background-color: #f4f4f4; /* 表头背景色 */
        font-weight: bold;
    }

    tr:nth-child(even) {
        background-color: #f9f9f9; /* 偶数行背景色 */
    }

    tr:hover {
        background-color: #f1f1f1; /* 鼠标悬停行高亮 */
    }

    h2 {
        font-family: Arial, sans-serif;
        margin-bottom: 10px;
    }
</style>

<table>
    <thead>
        <tr>
            <th>标题</th>
            <th>作者</th>
            <th>内容</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var blog in Model)
        {
            <tr>
                <td>@blog.Title</td>
                <td>@blog.Author</td>
                <td>@blog.Content</td>
            </tr>
        }
    </tbody>
</table>
